package com.itbaima.service.impl;

import com.itbaima.mapper.SalaryQueryMapper;
import com.itbaima.pojo.entity.Salary;
import com.itbaima.service.SalaryQueryService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SalaryQueryServiceImpl implements SalaryQueryService {

    private final SalaryQueryMapper salaryQueryMapper;

    // 构造方法注入 SalaryQueryMapper
    public SalaryQueryServiceImpl(SalaryQueryMapper salaryQueryMapper) {
        this.salaryQueryMapper = salaryQueryMapper;
    }

    @Override
    public List<Salary> getAllSalaryStandards() {
        // 从数据库获取所有薪酬标准
        return salaryQueryMapper.findAllSalaryStandards();
    }
}
